<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>GBA模拟器</title>

<script src="gpu-core.min.js"></script>
<script src="gpu.min.js"></script>

<script src="js/util.js"></script>
<script src="js/core.js"></script>
<script src="js/arm.js"></script>
<script src="js/thumb.js"></script>
<script src="js/mmu.js"></script>
<script src="js/io.js"></script>
<script src="js/audio.js"></script>
<script src="js/video.js"></script>
<script src="js/video/proxy.js"></script>
<script src="js/video/software.js"></script>
<script src="js/irq.js"></script>
<script src="js/keypad.js"></script>
<script src="js/sio.js"></script>
<script src="js/savedata.js"></script>
<script src="js/gpio.js"></script>
<script src="js/gba.js"></script>
<script src="resources/xhr.js"></script>

<script src="index.js"></script>

<script src="kaios.js"></script>
<link rel="stylesheet" href="main.css">

</head>
<body>

	<div id="container">

		<canvas id="screen" width="240" height="160"></canvas>

		<!-- 隐藏掉 -->
		<section id="controls" style="display: none;">


			<div id="preload">
				<input id="bios_loader" type="file" accept=".bin">
				<div>
					<label>游戏文件：</label>
					<input id="loader" type="file" accept=".gba" onChange="run(this.files[0]);">
				</div>

				<div style="display: none;">
					<label>存档文件：</label>
					<input id="saveloader" type="file" onChange="uploadSavedataPending(this.files[0]);">
				</div>
			</div>


			<!--
			<div id="in_game" class="hidden">

				<p id="openDebug" onClick="enableDebug()">调试器</p>
				<p>A对应键盘6，B对应键盘5</p>
				<p>L对应键盘2，R对应键盘3</p>
				<p>START对应右软键---SELECT对应左软键</p>

			</div>
			-->

		</section>
		<p style="display: none;">按Call键或m键打开说明</p>
	</div>

	<script>
		document.getElementById("bios_loader").onchange = function(){
			if (this.files.length >= 1)
			{
				var reader = new FileReader()
				reader.onloadend = function () {
                    gba.setBios(this.result);
                }
				reader.readAsArrayBuffer(this.files[0]);
			}
		}

		resizeCanvasFunc();
		//setPixelated(true);
		setVolume(1);
	</script>

</body>
</html>
